# Makefile
CC = gcc
CFLAGS = -Wall -O2
LDFLAGS = -lssl -lcrypto

SRCS = sm2_encrypt.c sm2_decrypt.c sm2_sign.c sm2_verify.c \
       sm3_hash.c sm3_hmac.c sm4_encrypt.c sm4_decrypt.c

PROGS = $(SRCS:.c=)

all: $(PROGS)

%: %.c utils.h
	$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)

clean:
	rm -f $(PROGS)

.PHONY: all clean
